<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>数据库错误</title>
    <style>
        body { background: #223344; color: #fff; font-family: "Microsoft YaHei", sans-serif; text-align: center; padding-top: 100px; }
        .error-box { background: #fff3cd; color: #856404; display: inline-block; padding: 30px 50px; border-radius: 12px; }
        .btn { margin-top: 30px; padding: 10px 30px; border: none; border-radius: 5px; background: #17a2b8; color: #fff; font-size: 18px; cursor: pointer; }
        .btn:hover { background: #138496; }
        .db-actions { margin-top: 30px; }
        .btn-db { margin: 0 10px; padding: 10px 20px; border-radius: 5px; font-size: 16px; border: none; }
        .btn-create-db { background: #28a745; color: #fff; }
        .btn-create-db:hover { background: #218838; }
        .btn-init-db { background: #17a2b8; color: #fff; }
        .btn-init-db:hover { background: #138496; }
    </style>
</head>
<body>
    <div class="error-box">
        <h2>数据库错误</h2>
        <p>{{ error_message }}</p>
        <div class="db-actions">
            <form method="post" action="{{ url_for('create_database') }}" style="display:inline;">
                <button type="submit" class="btn-db btn-create-db">创建数据库文件</button>
            </form>
            <form method="post" action="{{ url_for('init_database_route') }}" style="display:inline;">
                <button type="submit" class="btn-db btn-init-db">初始化数据库</button>
            </form>
        </div>
        <form action="{{ url_for('login') }}">
            <button class="btn" type="submit">返回登录页</button>
        </form>
    </div>
</body>
</html> 